"""
    通过事件点击才能触发API
"""

import requests


headers = {
    "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1 Edg/130.0.0.0"
}
url = "https://webapi.qingting.fm/api/mobile/rank/hotSaleWeekly"
response = requests.get(url, headers=headers).json()

for i in response["rankinglist"]:
    temp_dict = dict()  # 新建字典
    temp_dict["title"] = i["title"]
    temp_dict["desc"] = i["desc"]
    temp_dict["playCount"] = i["playCount"]
    print(f"{temp_dict}")

